home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 9
/
The PC-SIG Library on CD ROM - Ninth Edition.iso
/
401_500
/
DISK0417
/
DISK0417.ZIP
/
PROLOG.ARC
/
VISION.ARC
/
READ.ME
< prev
Wrap
Text File
|
1986-08-24
|
1KB
|
67 lines
"FRAMES" DOCUMENTATION
The prolog listing FRAMES.PRO will compile and run under
PDPROLOG. The major limitation of PDPROLOG in this context is
that it does not support floating-point arithmetic. We have
truncated the value of pi in the cylinder cross-sectional area
routine to 3. An alternative approach would be to use, e.g., 314
and mentally divide each area and volume by 100 to obtain an
answer to two decimal points. In any case, when you enter values
from the keyboard for, e.g., the Radius, you must use integer
values if you are running PDPROLOG.
To invoke the program, boot PDPROLOG and type:
consult('frames').
After the program has compiled, type:
frame_put(cylinder1,radius,2).
frame_put(cylinder1,height,10).
etc.
In order to see the affect of entering a value for the radius or
height, you may either type:
listing(cylinder1).
(Don't forget the period at the end of commands).
Or, you may use the frame_get predicate:
frame_get(cylinder1,X,Y).
X and Y must be capital letters. Initial caps indicate variable names
in Prolog.
LISTING2.PRO AND LISTING3.PRO ARE NOT STAND-ALONE PROGRAMS.
THEY CANNOT BE EXECUTED.